package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AvatarFramesMapper;
import com.ruoyi.system.domain.AvatarFrames;
import com.ruoyi.system.service.IAvatarFramesService;

/**
 * 头像框表Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-25
 */
@Service
public class AvatarFramesServiceImpl implements IAvatarFramesService 
{
    @Autowired
    private AvatarFramesMapper avatarFramesMapper;

    /**
     * 查询头像框表
     * 
     * @param id 头像框表主键
     * @return 头像框表
     */
    @Override
    public AvatarFrames selectAvatarFramesById(Integer id)
    {
        return avatarFramesMapper.selectAvatarFramesById(id);
    }

    /**
     * 查询头像框表列表
     * 
     * @param avatarFrames 头像框表
     * @return 头像框表
     */
    @Override
    public List<AvatarFrames> selectAvatarFramesList(AvatarFrames avatarFrames)
    {
        return avatarFramesMapper.selectAvatarFramesList(avatarFrames);
    }

    /**
     * 新增头像框表
     * 
     * @param avatarFrames 头像框表
     * @return 结果
     */
    @Override
    public int insertAvatarFrames(AvatarFrames avatarFrames)
    {
        avatarFrames.setCreateTime(DateUtils.getNowDate());
        return avatarFramesMapper.insertAvatarFrames(avatarFrames);
    }

    /**
     * 修改头像框表
     * 
     * @param avatarFrames 头像框表
     * @return 结果
     */
    @Override
    public int updateAvatarFrames(AvatarFrames avatarFrames)
    {
        return avatarFramesMapper.updateAvatarFrames(avatarFrames);
    }

    /**
     * 批量删除头像框表
     * 
     * @param ids 需要删除的头像框表主键
     * @return 结果
     */
    @Override
    public int deleteAvatarFramesByIds(Integer[] ids)
    {
        return avatarFramesMapper.deleteAvatarFramesByIds(ids);
    }

    /**
     * 删除头像框表信息
     * 
     * @param id 头像框表主键
     * @return 结果
     */
    @Override
    public int deleteAvatarFramesById(Integer id)
    {
        return avatarFramesMapper.deleteAvatarFramesById(id);
    }
}
